import request from '@/utils/request'

export function add(data) {
  return request({
    url: `admin/create-product-specifications`,
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'admin/delete-product-specifications',
    method: 'post',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'admin/update-product-specifications',
    method: 'post',
    data
  })
}

export function info(params) {
  return request({
    url: `admin/get-product-specifications`,
    method: 'get',
    params
  })
}

export function getList(params) {
  return request({
    url: `admin/get-product-specifications-list`,
    method: 'get',
    params
  })
}

export function formatSpecification(data) {
  return request({
    url: 'admin/format-product-specifications',
    method: 'post',
    data
  })
}

export default { add, edit, del, info }
